package MIPush.messagefactory;

import com.xiaomi.xmpush.server.Message;

import MIPush.MessageInfo;

public abstract class MessageFactory {
	private static final MessageFactory ANDROID_MESSAGE_FACTORY = new AndroidMessageFactory();
	private static final MessageFactory IOS_MESSAGE_FACTORY = new IOSMessageFactory();

	public static final int NOTIFY_TYPE_ALL = Message.NOTIFY_TYPE_ALL;
	/**
	 * 使用默认提示音提示
	 */
	public static final int DEFAULT_SOUND = Message.NOTIFY_TYPE_SOUND;
	/**
	 * 使用默认震动提示
	 */
	public static final int DEFAULT_VIBRATE = Message.NOTIFY_TYPE_VIBRATE;
	/**
	 * 使用默认led灯光提示
	 */
	public static final int DEFAULT_LIGHTS = Message.NOTIFY_TYPE_LIGHTS;

	/**
	 * 构建消息对象
	 * 
	 * @param messageInfo
	 * @return
	 */
	public abstract Message createMessage(MessageInfo messageInfo);

	public static final MessageFactory AndroidMessageFactory() {
		return ANDROID_MESSAGE_FACTORY;
	}

	public static final MessageFactory IOSMessageFactory() {
		return IOS_MESSAGE_FACTORY;
	}

}
